3.10 \(\int (a+\frac {c e x}{f}+c x^2)^p (\frac {a f}{c}+e x+f x^2)^q \, dx\)

Optimal. Leaf size=200 \[ -\frac {\sqrt {c} 2^{p+q+1} \left (a+\frac {c e x}{f}+c x^2\right )^p \left (\frac {a f}{c}+e x+f x^2\right )^{q+1} \left (-\frac {\sqrt {c} \left (-\frac {\sqrt {c e^2-4 a f^2}}{\sqrt {c}}+e+2 f x\right )}{\sqrt {c e^2-4 a f^2}}\right )^{-p-q-1} \, _2F_1\left (-p-q,p+q+1;p+q+2;\frac {\sqrt {c} \left (e+2 f x+\frac {\sqrt {c e^2-4 a f^2}}{\sqrt {c}}\right )}{2 \sqrt {c e^2-4 a f^2}}\right )}{(p+q+1) \sqrt {c e^2-4 a f^2}} \]

[Out]

-2^(1+p+q)*(a+c*e*x/f+c*x^2)^p*(a*f/c+e*x+f*x^2)^(1+q)*hypergeom([-p-q, 1+p+q],[2+p+q],1/2*c^(1/2)*(e+2*f*x+(-
4*a*f^2+c*e^2)^(1/2)/c^(1/2))/(-4*a*f^2+c*e^2)^(1/2))*c^(1/2)*(-c^(1/2)*(e+2*f*x-(-4*a*f^2+c*e^2)^(1/2)/c^(1/2
))/(-4*a*f^2+c*e^2)^(1/2))^(-1-p-q)/(1+p+q)/(-4*a*f^2+c*e^2)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 200, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {968, 624} \[ -\frac {\sqrt {c} 2^{p+q+1} \left (a+\frac {c e x}{f}+c x^2\right )^p \left (\frac {a f}{c}+e x+f x^2\right )^{q+1} \left (-\frac {\sqrt {c} \left (-\frac {\sqrt {c e^2-4 a f^2}}{\sqrt {c}}+e+2 f x\right )}{\sqrt {c e^2-4 a f^2}}\right )^{-p-q-1} \, _2F_1\left (-p-q,p+q+1;p+q+2;\frac {\sqrt {c} \left (e+2 f x+\frac {\sqrt {c e^2-4 a f^2}}{\sqrt {c}}\right )}{2 \sqrt {c e^2-4 a f^2}}\right )}{(p+q+1) \sqrt {c e^2-4 a f^2}} \]

Antiderivative was successfully verified.

[In]

Int[(a + (c*e*x)/f + c*x^2)^p*((a*f)/c + e*x + f*x^2)^q,x]

[Out]

-((2^(1 + p + q)*Sqrt[c]*(-((Sqrt[c]*(e - Sqrt[c*e^2 - 4*a*f^2]/Sqrt[c] + 2*f*x))/Sqrt[c*e^2 - 4*a*f^2]))^(-1
- p - q)*(a + (c*e*x)/f + c*x^2)^p*((a*f)/c + e*x + f*x^2)^(1 + q)*Hypergeometric2F1[-p - q, 1 + p + q, 2 + p
+ q, (Sqrt[c]*(e + Sqrt[c*e^2 - 4*a*f^2]/Sqrt[c] + 2*f*x))/(2*Sqrt[c*e^2 - 4*a*f^2])])/(Sqrt[c*e^2 - 4*a*f^2]*
(1 + p + q)))

Rule 624

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, -Simp[((a + b*x + c*
x^2)^(p + 1)*Hypergeometric2F1[-p, p + 1, p + 2, (b + q + 2*c*x)/(2*q)])/(q*(p + 1)*((q - b - 2*c*x)/(2*q))^(p
 + 1)), x]] /; FreeQ[{a, b, c, p}, x] && NeQ[b^2 - 4*a*c, 0] &&  !IntegerQ[4*p]

Rule 968

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_)*((d_) + (e_.)*(x_) + (f_.)*(x_)^2)^(q_.), x_Symbol] :> Dist[(a^Int
Part[p]*(a + b*x + c*x^2)^FracPart[p])/(d^IntPart[p]*(d + e*x + f*x^2)^FracPart[p]), Int[(d + e*x + f*x^2)^(p
+ q), x], x] /; FreeQ[{a, b, c, d, e, f, p, q}, x] && EqQ[c*d - a*f, 0] && EqQ[b*d - a*e, 0] &&  !IntegerQ[p]
&&  !IntegerQ[q] &&  !GtQ[c/f, 0]

Rubi steps

\begin {align*} \int \left (a+\frac {c e x}{f}+c x^2\right )^p \left (\frac {a f}{c}+e x+f x^2\right )^q \, dx &=\left (\left (a+\frac {c e x}{f}+c x^2\right )^p \left (\frac {a f}{c}+e x+f x^2\right )^{-p}\right ) \int \left (\frac {a f}{c}+e x+f x^2\right )^{p+q} \, dx\\ &=-\frac {2^{1+p+q} \sqrt {c} \left (-\frac {\sqrt {c} \left (e-\frac {\sqrt {c e^2-4 a f^2}}{\sqrt {c}}+2 f x\right )}{\sqrt {c e^2-4 a f^2}}\right )^{-1-p-q} \left (a+\frac {c e x}{f}+c x^2\right )^p \left (\frac {a f}{c}+e x+f x^2\right )^{1+q} \, _2F_1\left (-p-q,1+p+q;2+p+q;\frac {\sqrt {c} \left (e+\frac {\sqrt {c e^2-4 a f^2}}{\sqrt {c}}+2 f x\right )}{2 \sqrt {c e^2-4 a f^2}}\right )}{\sqrt {c e^2-4 a f^2} (1+p+q)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.24, size = 172, normalized size = 0.86 \[ \frac {2^{p+q-1} \left (\sqrt {c} (e+2 f x)-\sqrt {c e^2-4 a f^2}\right ) \left (a+\frac {c x (e+f x)}{f}\right )^p \left (\frac {a f}{c}+x (e+f x)\right )^q \left (\frac {\sqrt {c} (e+2 f x)}{\sqrt {c e^2-4 a f^2}}+1\right )^{-p-q} \, _2F_1\left (-p-q,p+q+1;p+q+2;\frac {1}{2}-\frac {\sqrt {c} (e+2 f x)}{2 \sqrt {c e^2-4 a f^2}}\right )}{\sqrt {c} f (p+q+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + (c*e*x)/f + c*x^2)^p*((a*f)/c + e*x + f*x^2)^q,x]

[Out]

(2^(-1 + p + q)*((a*f)/c + x*(e + f*x))^q*(a + (c*x*(e + f*x))/f)^p*(-Sqrt[c*e^2 - 4*a*f^2] + Sqrt[c]*(e + 2*f
*x))*(1 + (Sqrt[c]*(e + 2*f*x))/Sqrt[c*e^2 - 4*a*f^2])^(-p - q)*Hypergeometric2F1[-p - q, 1 + p + q, 2 + p + q
, 1/2 - (Sqrt[c]*(e + 2*f*x))/(2*Sqrt[c*e^2 - 4*a*f^2])])/(Sqrt[c]*f*(1 + p + q))

________________________________________________________________________________________

fricas [F]  time = 0.90, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\left (\frac {c f x^{2} + c e x + a f}{c}\right )^{q} \left (\frac {c f x^{2} + c e x + a f}{f}\right )^{p}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+c*e*x/f+c*x^2)^p*(a*f/c+e*x+f*x^2)^q,x, algorithm="fricas")

[Out]

integral(((c*f*x^2 + c*e*x + a*f)/c)^q*((c*f*x^2 + c*e*x + a*f)/f)^p, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (c x^{2} + \frac {c e x}{f} + a\right )}^{p} {\left (f x^{2} + e x + \frac {a f}{c}\right )}^{q}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+c*e*x/f+c*x^2)^p*(a*f/c+e*x+f*x^2)^q,x, algorithm="giac")

[Out]

integrate((c*x^2 + c*e*x/f + a)^p*(f*x^2 + e*x + a*f/c)^q, x)

________________________________________________________________________________________

maple [F]  time = 0.30, size = 0, normalized size = 0.00 \[ \int \left (c \,x^{2}+\frac {c e x}{f}+a \right )^{p} \left (f \,x^{2}+e x +\frac {a f}{c}\right )^{q}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+c*e*x/f+c*x^2)^p*(a*f/c+e*x+f*x^2)^q,x)

[Out]

int((a+c*e*x/f+c*x^2)^p*(a*f/c+e*x+f*x^2)^q,x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (c x^{2} + \frac {c e x}{f} + a\right )}^{p} {\left (f x^{2} + e x + \frac {a f}{c}\right )}^{q}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+c*e*x/f+c*x^2)^p*(a*f/c+e*x+f*x^2)^q,x, algorithm="maxima")

[Out]

integrate((c*x^2 + c*e*x/f + a)^p*(f*x^2 + e*x + a*f/c)^q, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int {\left (e\,x+f\,x^2+\frac {a\,f}{c}\right )}^q\,{\left (a+c\,x^2+\frac {c\,e\,x}{f}\right )}^p \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x + f*x^2 + (a*f)/c)^q*(a + c*x^2 + (c*e*x)/f)^p,x)

[Out]

int((e*x + f*x^2 + (a*f)/c)^q*(a + c*x^2 + (c*e*x)/f)^p, x)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+c*e*x/f+c*x**2)**p*(a*f/c+e*x+f*x**2)**q,x)

[Out]

Timed out

________________________________________________________________________________________